package org.example.elm_xiangmu.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.elm_xiangmu.po.OrderDetailet;

import java.util.List;

@Mapper
public interface OrderDetailetMapper {
    @Insert("insert into orderdetailet (orderId,foodId,quantity) values (#{orderId},#{foodId},#{quantity})")
    void saveOrderDetailet(OrderDetailet orderDetailet);

    @Select("select * from orderdetailet where orderId = #{orderId}")
    List<OrderDetailet> getOrderDetailetByOrderId(Integer orderId);
}
